package com.bestdreamer.thread_synchronized;

public class Demo2Run {

    public static void main(String[] args) {
        Demo2ObjectService service = new Demo2ObjectService();
        Demo2Thread1 thread1 = new Demo2Thread1(service);
        thread1.setName("a");
        thread1.start();
        Demo2Thread2 thread2 = new Demo2Thread2(service);
        thread2.setName("b");
        thread2.start();
    }
}
